package com.liang.test.experiment;

import java.util.Stack;

/**
 * @author Liangyaoyun
 */
public class MyStack {
    public static void main(String[] args) {
        Stack<Integer>stack=new Stack<>();
        for (int i = 0; i < 10; i++) {
            stack.add(i);
        }
        while (!stack.isEmpty()){
            System.out.print(stack.pop()+" ");
        }
    }
}
